﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace hse_2013_e_booking
{
    public partial class parol : Form
    {
        public parol()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string s1, s2;
            StreamReader sr = new StreamReader("adm.txt",Encoding.Default);
            s1 = sr.ReadLine();
            s2 = sr.ReadLine();
            sr.Close();
            if (maskedTextBox1.Text == s1 && maskedTextBox2.Text == s2)
            {
                admin admin = new admin();
                admin.Owner = this; admin.Show(); this.Hide();
            }
            else
            {
                MessageBox.Show("Неверный логин или пароль", "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

        }
    }
}
